<%--@elvariable id="industry" type="com.infitecs.eyas.quality.model.Industry"--%>
<%--@elvariable id="operateField" type="com.infitecs.eyas.power.model.OperateField"--%>
<%--
  Created by IntelliJ IDEA.
  User: pzw
  Date: 2015/4/1
  Time: 15:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="../includes/head.jsp" %>
    <title>${menu.menuName}</title>
</head>
<body class="page-header-fixed page-quick-sidebar-over-content">
<%@include file="../includes/top.jsp" %>
<div class="page-container">
    <%@include file="../includes/sidebar.jsp" %>
    <div class="page-content-wrapper">
        <div class="page-content">
            <%@include file="../includes/current.jsp" %>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet">
                        <%--<div class="portlet-title">--%>
                        <%--<div class="caption">--%>
                        <%--<i class="${menu.icon}"></i>${menu.menuName}--%>
                        <%--</div>--%>
                        <%--</div>--%>
                        <div class="portlet-body">
                            <form action="#" class="form-horizontal">
                                <div class="form-body">
                                    <div class="row">
                                        <div class="col-md-5">
                                            <div class="form-group">
                                                <label class="aTypeStyle col-md-3 control-label">全水分Mar(%)</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-medium"
                                                           id="mar" name="mar" value="${industry==null?"":industry.marShow}" >
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                        <div class="col-md-5">
                                            <div class="form-group">
                                                <label class="col-md-4 control-label">外在水分Mf(%)</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-medium"
                                                           id="mf" name="mf" readonly value="${industry==null?"":industry.mfShow}">
                                                </div>
                                            </div>
                                        </div>

                                        <!--/span-->
                                    </div>
                                </div>
                                <div class="form-body">
                                    <div class="row">
                                        <div class="col-md-5">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3">空气干燥基水分Mad(%)</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-medium"
                                                           id="mad" name="mad" value="${industry==null?"":industry.madShow}">

                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                        <div class="col-md-5">
                                            <div class="form-group">
                                                <label id="vdafLabel" class=" <c:if test="${industry!=null&&operateField.vdafState=='1'}">aTypeStyle </c:if>
                                                control-label col-md-4">干燥无灰基挥发分Vdaf(%)</label>

                                                <div class="col-md-6">
                                                    <input type="text" class="form-control "
                                                    <c:if test="${industry!=null&&operateField.vdafState=='0'}">
                                                           readonly
                                                    </c:if>
                                                           id="vdaf" name="vdaf" value="${industry==null?"":industry.vdafShow}">
                                                </div>
                                                <div class="col-md-2">
                                                    <input type="checkbox" id="vdafState" name="vdafState"
                                                    <c:if test="${industry==null}"> checked="checked"  </c:if>
                                                    <c:if test="${industry!=null&&operateField.vdafState=='1'}">
                                                           checked="checked"
                                                   </c:if>
                                                        >
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                    </div>

                                </div>
                                <div class="form-body">
                                    <div class="row">
                                        <div class="col-md-5">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3">收到基灰分Aar(%)</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-medium"
                                                           id="aar" name="aar" value="${industry==null?"":industry.aarShow}">
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                        <div class="col-md-5">
                                            <div class="form-group">
                                                <label id="varLabel" class="
                                                <c:if test="${industry!=null&&operateField.varState=='1'}">aTypeStyle</c:if>
                                                control-label col-md-4">收到基挥发分Var(%)</label>

                                                <div class="col-md-6">
                                                    <input type="text" class="form-control"
                                                    <c:if test="${industry==null}"> readonly</c:if>
                                                    <c:if test="${industry!=null&&operateField.varState=='0'}">
                                                           readonly
                                                    </c:if>
                                                       id="var" name="var" value="${industry==null?"":industry.varShow}">
                                                </div>
                                                <div class="col-md-2">
                                                    <input type="checkbox" id="varState" name="varState"
                                                    <c:if test="${industry!=null&&operateField.varState=='1'}">
                                                            checked="checked"
                                                    </c:if>
                                                      >
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                    </div>
                                </div>
                                <div class="form-body">
                                    <div class="row">
                                        <div class="col-md-4">
                                        </div>
                                        <div class="col-md-6">
                                            <button type="button" class="btn green" id="save" onclick="IndustryPage.industrySave()">确定</button>
                                            <button type="button" class="btn green" id="nextPage" onclick="IndustryPage.industryNext()">下一页</button>
                                        </div>
                                        <!--/span-->
                                    </div>
                                    <!--/span-->
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" id="caseId" value="${caseId}" name="caseId">
<input type="hidden" id="addFlag" value="${industry==null?"add":"edit"}" name="addFlag">
<%@include file="../includes/footer.jsp" %>
<%@include file="../includes/bottomscript.jsp" %>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/DataTables/media/js/jquery.dataTables.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.core-3.5.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.excheck-3.5.min.js"/>"></script>

<script type="text/javascript"
        src="<c:url value="/js/quality/industry1.js"/>"></script>
<script>

    $(document).ready(function () {
        var caseId = $("#caseId").val();
        if (caseId == "") {
            toast.error("方案为空，请新建方案");
            setTimeout(function () {
                window.location.href = basePath + "power/power?menuId=12";
            }, 1200);
        }
        IndustryPage.init();
    });

</script>
<script type="text/javascript">
    $(function () {
        <%
        String message = (String) request.getAttribute("message");
        if(message!=null&&!"".equals(message)){
        if(message.equals("success")){
        %>
        toast.success("操作成功");
        <%
        }else{
        %>
        toast.error("<%=request.getAttribute("message")%>");
        <%
         }
            }
       %>
    });
</script>
</body>
</html>
